<?php foreach( $data['button'] as $key => $row ) : ?>  
<div class="row" style="margin-bottom:8px;">
  <div class="col-md-3">
    <div class="input-group">
      <input name="main_menu_name_<?php echo $key ?>" type="text" class="form-control main_menu_name" placeholder="菜单名称" value="<?php echo $row['name'] ?>">
      <span class="input-group-btn">
        <button class="btn btn-primary add_submenu_btn" type="button">+</button>
      </span>
    </div><!-- /input-group -->
  </div>
  <div class="col-md-2">
    <input name="main_menu_value_<?php echo $key ?>" type="text" class="form-control main_menu_value" placeholder="关键字或动作" value="<?php echo $row['value'] ?>">
  </div>
  <div class="col-md-2">
    <button type="button" class="btn btn-default main_menu_up_btn"><i class="fa fa-arrow-up"></i></button>
    <button type="button" class="btn btn-default main_menu_down_btn"><i class="fa fa-arrow-down"></i></button>
    <button type="button" class="btn btn-default main_menu_delete"><i class="fa fa-times"></i></button>
  </div>
</div>
  <?php foreach( $row['sub_button'] as $k => $r ) : ?>
  <div class="row" style="margin-bottom:8px;">
    <div class="col-md-1"></div>
    <div class="col-md-2">
      <input name="sub_menu_name_<?php echo $k ?>" type="text" class="form-control sub_menu_name" placeholder="子菜单名称" value="<?php echo $r['name'] ?>">
    </div>
    <div class="col-md-2">
      <input name="sub_menu_value_<?php echo $k ?>" type="text" class="form-control sub_menu_value" placeholder="关键字或动作" value="<?php echo $r['value'] ?>">
    </div>
    <div class="col-md-2">
      <button type="button" class="btn btn-default sub_menu_up_btn"><i class="fa fa-arrow-up"></i></button>
      <button type="button" class="btn btn-default sub_menu_down_btn"><i class="fa fa-arrow-down"></i></button>
      <button type="button" class="btn btn-default sub_menu_delete"><i class="fa fa-times"></i></button>
    </div>
  </div>
  <?php endforeach ; ?>
<?php endforeach ; ?>